using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;

namespace AutoMapperStudy
{
    public static class AutoMapperConfiguration 
    {
        public static MapperConfiguration Configure()
        {
            return new MapperConfiguration(cfg =>
            {
                cfg.CreateMap<OrderDto, Order>()
                    .ForMember(dest => dest.OrderNumber, opt => opt.MapFrom(src => src.OrderNumber))
                    .ForMember(dest => dest.TotalPrice, opt => opt.MapFrom(src => src.TotalPrice))
                    .ForMember(dest => dest.TotalQty, opt => opt.MapFrom(src => src.TotalQty))
                    .ForMember(dest => dest.teset, opt => opt.MapFrom(src => src.OrderNumber));
            });
        }
    }
    
    
}
